home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / Level 1 Extensions 29Sep94 / Numbers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  1.1 KB  |  34 lines  |  [TEXT/KAHL]

  1. /* Numbers.h */
  2.  
  3. #ifndef Included_Numbers_h
  4. #define Included_Numbers_h
  5.  
  6. /* Numbers module depends on: */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12.  
  13. /* these routines work on NON null terminated strings */
  14.  
  15. /* convert a string to a long double.  string is not null terminated, that's why */
  16. /* the length value is required. */
  17. long double            StringToLongDouble(char* String, long Length);
  18.  
  19. /* convert a long double to a string.  If the absolute value of Value is outside */
  20. /* of LowBound and HighBound, then it will be in scientific notation */
  21. /* a heap block is allocated, so NIL is returned if it fails due to lack of memory. */
  22. char*                        LongDoubleToString(long double Value, int NumDigits,
  23.                                     long double LowBound, long double HighBound);
  24.  
  25. /* convert a string to an integer.  the string is not null terminated, so */
  26. /* the length value is required */
  27. long                        StringToInteger(char* String, long Length);
  28.  
  29. /* convert an integer to a string */
  30. /* a heap block is allocated, so NIL is returned if it fails due to lack of memory. */
  31. char*                        IntegerToString(long Integer);
  32.  
  33. #endif
  34.